The present invention relates to data updating in a file system, and more specifically, to a method of updating data of a file on a tape in a file system using a tape drive.
Linear Tape File System (LTFS) is a technique allowing data to be recorded in and read out from a tape loaded in a tape drive through a file system. LTFS allows a user to use the tape as large-capacity external recording media through similar operations performed on removable hard disks. LTFS offers a scheme for making an access to the data on the tape as a file by managing the meta-information of the file as an index.
The meta-information in the index includes the block number of the block in which the file is written, offset, file size, file name, and extended attribute information, etc. The following notation is used in the following explanations for simplicity:                File X (offset 1, size 1) (offset 2, size 2) . . .This notation denotes that the File X is constituted of a section having the size 1 and written from the offset 1 and another section having the size 2 and written from the offset 2, where each portion “(offset, size)” is called “extent.”        
When programs of application modify any part of the file read from the file system (LTFS in this case), the programs only write the modified portion in the file system. LTFS features the scheme for fragmenting the modified section of the file and writing the fragmented section as another extent, FIG. 1 shows a configuration example of a conventional method of editing a file (updating data) by fragmentation in LTFS using a tape drive. Note that the tape drive is also known as a sequential device which is allowed to write data only after the last end of the data (EOD).
A certain section (data part) of the file A which has the extent (X1, Y1) as shown in FIG. 1(a) is edited and re-written. Specifically, the data of the file A having the size Y1 and written starting from the offset X1 is edited (modified). In the result, the new file A is obtained as shown in FIG. 1(b). The data 1 having the size Y1′ and written starting from the offset X1, the data 2 having the size Y3 and written starting from the offset X3, and the data 3 having the size Y2 and written starting from the offset X2 constitute the new file A. The new file A has three fragmented data 1, 2, 3 and becomes to have the extent (X1, Y1′) (X3, Y3) (X2, Y2) corresponding to each data. It will be appreciated that the capacity used on the tape is reduced relative to a case where the entire file is re-written.
Meanwhile, there is a problem when this file A is read. That is, movement on the tape increases as illustrated in FIG. 2, which causes the operation to be slowed down. In FIG. 2, when the file A is read out, seek time (seek_1, seek_2, seek_3) for seeking the subsequent data position (X1, X3, X2) occurs, which has a large influence on the read performance. Specially, in the seek operation, movement on the tape of about 1000 m takes place with speed of 12.4 m/sec, so that the movement from one end to the other end of the tape takes about 80 seconds, and the movement from any position to another position takes about 27 seconds on average. Hence, occurrence of one more dashed arrow in FIG. 2 causes additional seek time in the order of 27 seconds.
In the course of file update as illustrated in FIG. 1, the time required for reading one file becomes prolonged in proportion to the frequency of file updates. Therefore, it is necessary to shorten time of the readout of the updated file in the file system using the tape drive.